#include <QCoreApplication>
#include <iostream>
using namespace std;

int main()
{
    int m,n;
    cout <<"Vvedite MASTI:\n";
    cin >>m;

    cout <<"Vvedite DOSTOINSTVO:\n";
    cin >>n;

    switch (m)
    {
    case 1:
        cout<<"piki ";
        break;
    case 2:
        cout<<"trefii ";
        break;
    case 3:
        cout<<"bybni ";
        break;
    case 4:
        cout<<"chervii ";
        break;

    }

    switch (n)
    {
    case 6:
        cout<<"shesterka";
        break;

    case 7:
        cout<<"semerka";
        break;
    case 8:
        cout<<"vosmerka";
        break;
    case 9:
        cout<<"deviatka";
        break;
    case 10:
        cout<<"desiatka";
        break;
    case 11:
        cout<<"valet";
        break;
    case 12:
        cout<<"gama";
        break;
    case 13:
        cout<<"korol";
        break;
    case 14:
        cout<<"tuss";
        break;
    }

    return 0;
}
